package com.example.warehouse_manager.entity;

import javax.validation.constraints.Size;
import javax.validation.constraints.NotNull;

import java.io.Serializable;

import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;

/**
* 采购单
* @TableName buy_list
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
public class Purchase implements Serializable {

    /**
    *
    */
    @NotNull(message="[]不能为空")
    private Integer buyId;
    /**
    *
    */
    private Integer productId;
    /**
    *
    */
    private Integer storeId;
    /**
    *
    */
    private Integer buyNum;
    /**
    *
    */
    private Integer factBuyNum;
    /**
    *
    */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date buyTime;
    /**
    *
    */
    private Integer supplyId;
    /**
    *
    */
    private Integer placeId;
    /**
    *
    */
    @Size(max= 20,message="编码长度不能超过20")
    @Length(max= 20,message="编码长度不能超过20")
    private String buyUser;
    /**
    *
    */
    @Size(max= 20,message="编码长度不能超过20")
    @Length(max= 20,message="编码长度不能超过20")
    private String phone;
    /**
    * 0 否 1 是
    */
    private String isIn;

    //追加属性
    private String startTime;//起始时间

    private String endTime;//结束时间

    private String storeName;//仓库名称

    private String productName;//商品名称

}
